package run.siyuan.jdk.高并发;

import java.util.concurrent.CountDownLatch;

/**
 * {@code ClassName:} aaa
 * {@code Description:} TODO
 * {@code Author:} siyuan
 * {@code Date:} 2023/2/26 20:46
 */
public class aaa {

        public static void main(String[] args) throws InterruptedException {
            CountDownLatch count = new CountDownLatch(1);
            for (int i = 0; i < 3; i++) {
                new Thread(()->{
                    try {
                        count.await();
                        System.out.println(System.currentTimeMillis());
                    } catch (InterruptedException e) {
                        throw new RuntimeException(e);
                    }
                }).start();
            }
            Thread.sleep(500);
            count.countDown();

        }

}
